import * as React from 'react'; import { FabricSlots, IThemeRules } from 'office-ui-fabric-react/lib/ThemeGenerator'; import { MainPanelInnerContent } from '../shared/MainPanelStyles'; import { mergeStyles } from '@uifabric/merge-styles'; import { Text } from 'office-ui-fabric-react'; import { IColor } from 'office-ui-fabric-react/lib/Color'; import { FabricSlotWidget } from './FabricSlotWidget'; import { DirectionalHint } from 'office-ui-fabric-react/lib/Callout'; export interface IFabricPaletteProps { themeRules?: IThemeRules; onFabricPaletteColorChange: (newColor: IColor | undefined, fabricSlot: FabricSlots) => void; } const tableClassName = mergeStyles({ width: '100%', selectors: { thead: { textAlign: 'center', }, tr: { padding: 80, textAlign: 'left', }, th: { display: 'table-cell', }, td: { padding: 10, textAlign: 'left', display: 'table-cell', }, }, }); export const FabricPalette: React.FunctionComponent = (props: IFabricPaletteProps) => { const { themeRules, onFabricPaletteColorChange } = props; return (
Primary Hex Foreground Hex Background Hex {themeRules[FabricSlots[FabricSlots.themeDarker]].color.str} {themeRules[FabricSlots[FabricSlots.black]].color.str} {themeRules[FabricSlots[FabricSlots.neutralTertiaryAlt]].color.str} {themeRules[FabricSlots[FabricSlots.themeDark]].color.str} {themeRules[FabricSlots[FabricSlots.neutralDark]].color.str} {themeRules[FabricSlots[FabricSlots.neutralDark]].color.str} {themeRules[FabricSlots[FabricSlots.themeDarkAlt]].color.str} {themeRules[FabricSlots[FabricSlots.neutralPrimary]].color.str} {themeRules[FabricSlots[FabricSlots.neutralQuaternaryAlt]].color.str} {themeRules[FabricSlots[FabricSlots.themePrimary]].color.str} {themeRules[FabricSlots[FabricSlots.neutralPrimaryAlt]].color.str} {themeRules[FabricSlots[FabricSlots.neutralLight]].color.str} {themeRules[FabricSlots[FabricSlots.themeSecondary]].color.str} {themeRules[FabricSlots[FabricSlots.neutralSecondary]].color.str} {themeRules[FabricSlots[FabricSlots.neutralLighter]].color.str} {themeRules[FabricSlots[FabricSlots.themeTertiary]].color.str} {themeRules[FabricSlots[FabricSlots.neutralTertiary]].color.str} {themeRules[FabricSlots[FabricSlots.neutralLighterAlt]].color.str} {themeRules[FabricSlots[FabricSlots.themeLight]].color.str} {themeRules[FabricSlots[FabricSlots.white]].color.str} {themeRules[FabricSlots[FabricSlots.themeLighter]].color.str} {themeRules[FabricSlots[FabricSlots.themeLighterAlt]].color.str}
); };