Skip to content

Commit

Permalink
Add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi749 committed Oct 3, 2023
1 parent c851867 commit 661726b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import React, { FC } from 'react'
import { useProjectInformationContext } from '../context'
import { CLOSE_PANEL } from '../reducer'
import { IBasePanelProps } from './types'
import { FluentProvider, useId, webLightTheme } from '@fluentui/react-components'
import { FluentProvider, webLightTheme } from '@fluentui/react-components'
import styles from './BasePanel.module.scss'

export const BasePanel: FC<IBasePanelProps> = (props) => {
const fluentProviderId = useId('fluent-provider')
const context = useProjectInformationContext()

return (
Expand All @@ -18,11 +17,7 @@ export const BasePanel: FC<IBasePanelProps> = (props) => {
onRenderBody={() => {
if (!props.onRenderBody) return null
return (
<FluentProvider
id={fluentProviderId}
theme={webLightTheme}
className={styles.root}
>
<FluentProvider theme={webLightTheme} className={styles.root}>
{props.onRenderBody()}
</FluentProvider>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import styles from './EditPropertiesPanel.module.scss'
import { FluentIcon } from '@fluentui/react-icons/lib/utils/createFluentIcon'
import { DatePicker, DayOfWeek } from '@fluentui/react-datepicker-compat'

/**
* Hook for field elements of `EditPropertiesPanel` component. This hook is used to render field elements
* based on field type. Supported field types are:
Expand Down Expand Up @@ -119,6 +120,7 @@ export function useFieldElements(model: UseModelReturnType) {
hint={field.description}
>
<DatePicker
// TODO: Fix FluentProvider bug with DatePicker
value={model.get(field)}
onSelectDate={(date) => model.set(field, date)}
formatDate={(date) => date.toLocaleDateString()}
Expand Down

0 comments on commit 661726b

Please sign in to comment.