| 653 | } |
| 654 | |
| 655 | function renderImport(name, from, isDefault = false) { |
| 656 | return ( |
| 657 | <Fragment key={from}> |
| 658 | <span className={style({color: 'magenta-1000'})}>import</span> {isDefault ? null : '{'} |
| 659 | {name} |
| 660 | {isDefault ? null : '}'} <span className={style({color: 'magenta-1000'})}>from</span>{' '} |
| 661 | {from.startsWith('./') ? ( |
| 662 | <TabLink className={style({color: 'green-1000'})} name={from.slice(2)}> |
| 663 | '{from}' |
| 664 | </TabLink> |
| 665 | ) : ( |
| 666 | <span className={style({color: 'green-1000'})}>'{from}'</span> |
| 667 | )} |
| 668 | {';'} |
| 669 | </Fragment> |
| 670 | ); |
| 671 | } |
| 672 | |
| 673 | export function Control({name}: {name: string}) { |
| 674 | let {controls, props, setProps} = useContext(Context); |