()
| 439 | } |
| 440 | |
| 441 | function Properties() { |
| 442 | let {brightness, contrast, saturation, onChange} = useContext(FilterContext); |
| 443 | let isHCM = 'style' in useContext(HCMContext); |
| 444 | return ( |
| 445 | <div |
| 446 | role="group" |
| 447 | aria-label="Properties" |
| 448 | className={style({display: 'flex', flexDirection: 'column', gap: 8, padding: 8})}> |
| 449 | <Accordion |
| 450 | density="compact" |
| 451 | isQuiet |
| 452 | allowsMultipleExpanded |
| 453 | defaultExpandedKeys={['filters', 'text']}> |
| 454 | <Disclosure id="filters"> |
| 455 | <DisclosureTitle>Filters</DisclosureTitle> |
| 456 | <DisclosurePanel> |
| 457 | <Form labelPosition="side" size="S" UNSAFE_style={{gap: 8}}> |
| 458 | <Slider |
| 459 | label="Brightness" |
| 460 | minValue={-100} |
| 461 | maxValue={100} |
| 462 | fillOffset={0} |
| 463 | formatOptions={{signDisplay: 'exceptZero'}} |
| 464 | defaultValue={brightness} |
| 465 | onChange={brightness => onChange({brightness, contrast, saturation})} |
| 466 | /> |
| 467 | <Slider |
| 468 | label="Contrast" |
| 469 | minValue={-100} |
| 470 | maxValue={100} |
| 471 | fillOffset={0} |
| 472 | formatOptions={{signDisplay: 'exceptZero'}} |
| 473 | defaultValue={contrast} |
| 474 | onChange={contrast => onChange({brightness, contrast, saturation})} |
| 475 | /> |
| 476 | <Slider |
| 477 | label="Saturation" |
| 478 | minValue={-100} |
| 479 | maxValue={100} |
| 480 | fillOffset={0} |
| 481 | formatOptions={{signDisplay: 'exceptZero'}} |
| 482 | defaultValue={saturation} |
| 483 | onChange={saturation => onChange({brightness, contrast, saturation})} |
| 484 | /> |
| 485 | </Form> |
| 486 | </DisclosurePanel> |
| 487 | </Disclosure> |
| 488 | <Disclosure id="text"> |
| 489 | <DisclosureTitle>Text</DisclosureTitle> |
| 490 | <DisclosurePanel> |
| 491 | <Form size="S" UNSAFE_style={{gap: 8}}> |
| 492 | <div |
| 493 | className={style({ |
| 494 | display: 'flex', |
| 495 | gap: 8, |
| 496 | alignItems: 'center', |
| 497 | gridColumnStart: 'span 2' |
| 498 | })}> |
nothing calls this directly
no test coverage detected