MCPcopy Create free account
hub / github.com/dailydotdev/apps / ThemeWidget

Function ThemeWidget

packages/shared/src/components/widgets/ThemeWidget.tsx:29–52  ·  view source on GitHub ↗
({
  option,
  onChange,
  ...props
}: ThemeWidgetProps)

Source from the content-addressed store, hash-verified

27};
28
29function ThemeWidget({
30 option,
31 onChange,
32 ...props
33}: ThemeWidgetProps): ReactElement {
34 return (
35 <label
36 htmlFor={option.value}
37 className="relative flex h-24 w-full flex-row items-center overflow-hidden rounded-14 bg-border-subtlest-tertiary pl-4 hover:cursor-pointer"
38 >
39 <RadioItem
40 {...props}
41 name="theme"
42 id={option.value}
43 value={option.value}
44 onChange={() => onChange(option.value)}
45 className={{ content: 'my-0.5 truncate' }}
46 >
47 {option.label}
48 </RadioItem>
49 {bg[option.value]}
50 </label>
51 );
52}
53
54export default ThemeWidget;

Callers

nothing calls this directly

Calls 1

onChangeFunction · 0.50

Tested by

no test coverage detected