From 35cb769456d6b94c768b6ce3afd9535918aea0a1 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 17 Dec 2018 12:57:59 -0800 Subject: prettify file --- packages/website/ts/@next/pages/instant/select.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'packages/website') diff --git a/packages/website/ts/@next/pages/instant/select.tsx b/packages/website/ts/@next/pages/instant/select.tsx index 422818f9f..1e428c9a1 100644 --- a/packages/website/ts/@next/pages/instant/select.tsx +++ b/packages/website/ts/@next/pages/instant/select.tsx @@ -20,9 +20,20 @@ export const Select: React.FunctionComponent = ({ value, id, items, - {items.map((item, index) => )} + {items.map((item, index) => ( + + ))} - + + + ); }; -- cgit v1.2.3 From d32f77ebb93a904ee33a43db9207c20c889b0d8f Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 17 Dec 2018 13:01:15 -0800 Subject: Add includeEmpty option --- .../ts/@next/pages/instant/config_generator.tsx | 32 ++++++++++++---------- packages/website/ts/@next/pages/instant/select.tsx | 15 ++++++++-- 2 files changed, 29 insertions(+), 18 deletions(-) (limited to 'packages/website') diff --git a/packages/website/ts/@next/pages/instant/config_generator.tsx b/packages/website/ts/@next/pages/instant/config_generator.tsx index 4f837d7fa..a1263da58 100644 --- a/packages/website/ts/@next/pages/instant/config_generator.tsx +++ b/packages/website/ts/@next/pages/instant/config_generator.tsx @@ -64,7 +64,13 @@ export class ConfigGenerator extends React.Component - {this._renderTokenMultiSelectOrSpinner()} @@ -257,7 +263,9 @@ export class ConfigGenerator extends React.Component - {metaData.symbol.toUpperCase()} — {metaData.name} + + {metaData.symbol.toUpperCase()} — {metaData.name} + ), onClick: this._handleTokenClick.bind(this, assetData), @@ -287,18 +295,9 @@ export const ConfigGeneratorSection: React.StatelessComponent {title} - {isOptional && ( - - {' '} - Optional - - )} + {isOptional && Optional} - {actionText && ( - - {actionText} - - )} + {actionText && {actionText}} {children} @@ -319,10 +318,13 @@ interface CheckboxTextProps { isSelected?: boolean; } -const CheckboxText = styled.span` +const CheckboxText = + styled.span < + CheckboxTextProps > + ` font-size: 14px; line-height: 18px; - color: ${props => props.isSelected ? colors.brandDark : '#666666'} + color: ${props => (props.isSelected ? colors.brandDark : '#666666')} `; const OptionalAction = styled(OptionalText)` diff --git a/packages/website/ts/@next/pages/instant/select.tsx b/packages/website/ts/@next/pages/instant/select.tsx index 1e428c9a1..f5b5e60c8 100644 --- a/packages/website/ts/@next/pages/instant/select.tsx +++ b/packages/website/ts/@next/pages/instant/select.tsx @@ -12,14 +12,22 @@ interface SelectProps { id: string; items: SelectItemConfig[]; emptyText?: string; - onChange?: () => void; + onChange?: (ev: React.ChangeEvent) => void; + includeEmpty: boolean; } -export const Select: React.FunctionComponent = ({ value, id, items, emptyText, onChange }) => { +export const Select: React.FunctionComponent = ({ + value, + id, + items, + includeEmpty, + emptyText, + onChange, +}) => { return ( - + {includeEmpty && } {items.map((item, index) => (