Skip to content

Commit

Permalink
fix: taking the constants out of the function in DateTimePicker compo…
Browse files Browse the repository at this point in the history
…nent
  • Loading branch information
Adrian Estevez authored and Adrian Estevez committed Nov 4, 2022
1 parent f17f808 commit 63feb9c
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/components/DateTimePicker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,27 +301,27 @@ const PictureIcon = styled(Picture)`
import React, { useState } from 'react';
import { DateTimePicker, Picklist, PicklistOption } from 'react-rainbow-components';

const containerStyles = {
maxWidth: 400,
};

const initialState = {
value: new Date('2019-10-25 10:44'),
locale: { name: 'en-US', label: 'English (US)' },
};

const okButtonLocalizedLabel = {
'en-US': 'OK',
'es-ES': 'Aceptar',
'fr-Fr': "D'accord",
};

const cancelButtonLocalizedLabel = {
'en-US': 'Cancel',
'es-ES': 'Cancelar',
'fr-Fr': 'Annuler',
};
const DateTimePickerBorderRadius = () => {
const containerStyles = {
maxWidth: 400,
};

const initialState = {
value: new Date('2019-10-25 10:44'),
locale: { name: 'en-US', label: 'English (US)' },
};

const okButtonLocalizedLabel = {
'en-US': 'OK',
'es-ES': 'Aceptar',
'fr-Fr': "D'accord",
};

const cancelButtonLocalizedLabel = {
'en-US': 'Cancel',
'es-ES': 'Cancelar',
'fr-Fr': 'Annuler',
};

const [value1, setValue1] = useState(initialState.value);
const [value2, setValue2] = useState(initialState.value);
Expand Down

0 comments on commit 63feb9c

Please sign in to comment.