/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
client/components/timezone/docs/example.jsx
23 строки
576 B
Marko Andrijasevic
React: add new JSX transform (#56451)
29 сен 2021, 13:49
Не верифицирован
29 сен 2021, 13:49
f2e6f88
Код
Авторство
О чём код?
import { Card } from '@automattic/components'; import { PureComponent } from 'react'; import Timezone from 'calypso/components/timezone'; export default class TimezoneExample extends PureComponent { static displayName = 'TimezoneExample'; state = { timezone: 'America/Argentina/La_Rioja', }; onTimezoneSelect = ( timezone ) => { this.setState( { timezone } ); }; render() { return ( <Card style={ { width: '300px', height: '350px', margin: 0 } }> <Timezone selectedZone={ this.state.timezone } onSelect={ this.onTimezoneSelect } /> </Card> ); } }