| 644 | } |
| 645 | |
| 646 | function renderImport(name, from, isDefault = false) { |
| 647 | return ( |
| 648 | <Fragment key={from}> |
| 649 | <span className={style({color: 'magenta-1000'})}>import</span> {isDefault ? null : '{'} |
| 650 | {name} |
| 651 | {isDefault ? null : '}'} <span className={style({color: 'magenta-1000'})}>from</span>{' '} |
| 652 | {from.startsWith('./') ? ( |
| 653 | <TabLink className={style({color: 'green-1000'})} name={from.slice(2)}> |
| 654 | '{from}' |
| 655 | </TabLink> |
| 656 | ) : ( |
| 657 | <span className={style({color: 'green-1000'})}>'{from}'</span> |
| 658 | )} |
| 659 | {';'} |
| 660 | </Fragment> |
| 661 | ); |
| 662 | } |
| 663 | |
| 664 | export function Control({name}: {name: string}) { |
| 665 | let {controls, props, setProps} = useContext(Context); |