From fdbaf8fca76590aec8adb4baf8e524ff9c0802a0 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 7 Aug 2018 15:45:47 -0700 Subject: [PATCH 1/2] implement new Input type Radio --- lib/Bui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Bui.js b/lib/Bui.js index 16aa7a5..a0c8d28 100644 --- a/lib/Bui.js +++ b/lib/Bui.js @@ -202,9 +202,9 @@ class Bui extends PureComponent {
Radio Form
- Yes
- No
- Maybe
+ {}}> + { ['yes', 'no', 'maybe'] } +
{radioFormCode}
From d6b87273f5e14388dcfc026305bb9675ae23678b Mon Sep 17 00:00:00 2001 From: terrapanda Date: Wed, 8 Aug 2018 01:16:21 -0700 Subject: [PATCH 2/2] Add option to pass [Label, Value] to radio list --- lib/Bui.js | 4 ++-- lib/constants/codeSnippets.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/Bui.js b/lib/Bui.js index a0c8d28..92b9974 100644 --- a/lib/Bui.js +++ b/lib/Bui.js @@ -202,8 +202,8 @@ class Bui extends PureComponent {
Radio Form
- {}}> - { ['yes', 'no', 'maybe'] } + + {['yes', 'no', ['maybe', 'any value']]}
{radioFormCode} diff --git a/lib/constants/codeSnippets.js b/lib/constants/codeSnippets.js index 8ff4693..eb76d8b 100644 --- a/lib/constants/codeSnippets.js +++ b/lib/constants/codeSnippets.js @@ -100,10 +100,11 @@ export const loginFormCode = `import { Input } from '@bpanel/bpanel-ui'; export const radioFormCode = `import { Input } from '@bpanel/bpanel-ui';
- Yes
- No
- Maybe
-
`; + {e.target.value}}> + {['yes', 'no', ['maybe', 'any value']]} + + +`; export const fileUploadCode = `import { Input } from '@bpanel/bpanel-ui';