import * as React from 'react'; import { SpinButton, ISpinButtonStyleProps, ISpinButtonStyles } from '@fluentui/react/lib/SpinButton'; import { IButtonStyles } from '@fluentui/react/lib/Button'; import { IStyleFunction } from '@fluentui/react/lib/Utilities'; const styles: IStyleFunction = (props: ISpinButtonStyleProps) => { const { isFocused, theme } = props; return { spinButtonWrapper: [ { width: 75 }, // Example of conditional styling based on component state isFocused && { outline: '5px solid ' + theme.palette.yellow, }, ], }; }; const upArrowButtonStyles: Partial = { rootChecked: { backgroundColor: 'green', }, rootPressed: { backgroundColor: 'green', }, }; const downArrowButtonStyles: Partial = { rootChecked: { backgroundColor: 'red', }, rootPressed: { backgroundColor: 'red', }, }; export const SpinButtonCustomStyledExample: React.FunctionComponent = () => { return ( ); };