From 43383dbcee335bbc3aaa780b3724e1b431718a4d Mon Sep 17 00:00:00 2001 From: ThakurBallary Date: Tue, 23 Feb 2021 20:19:08 +0530 Subject: [PATCH] Added containerStyle to RadioButton --- README.md | 1 + index.d.ts | 21 +++------------------ index.js | 2 +- lib/{RadioButtonsGroup => }/RadioButton.tsx | 3 ++- lib/{RadioButtonsGroup => }/RadioGroup.tsx | 3 +-- lib/{RadioButtonsGroup => }/index.ts | 0 lib/{RadioButtonsGroup => }/types.ts | 1 + package.json | 2 +- 8 files changed, 10 insertions(+), 23 deletions(-) rename lib/{RadioButtonsGroup => }/RadioButton.tsx (97%) rename lib/{RadioButtonsGroup => }/RadioGroup.tsx (91%) rename lib/{RadioButtonsGroup => }/index.ts (100%) rename lib/{RadioButtonsGroup => }/types.ts (93%) diff --git a/README.md b/README.md index 52aef69..106a330 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ export default function App() { Key | Type | Required | Default | Valid Values --- | --- | --- | --- | --- color | string | no | #444 | css color formats +containerStyle | object | no | | react style disabled | boolean | no | false | true / false id | string | yes | | any string label | string | no | | any string diff --git a/index.d.ts b/index.d.ts index c85b6e9..beafc98 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,24 +1,9 @@ import * as React from "react"; -export interface RadioButtonProps { - color?: string; - disabled?: boolean; - id: string; - label?: string; - labelStyle?: object; - layout?: "row" | "column"; - onPress?: (id: string) => void; - selected?: boolean; - size?: number; - value?: string; -} - -export interface RadioGroupProps { - layout?: "row" | "column"; - onPress?: (radioButtons: RadioButtonProps[]) => void; - radioButtons: RadioButtonProps[]; -} +import { RadioGroupProps } from "./lib"; declare class RadioGroup extends React.Component {} +export * from "./lib/types"; + export default RadioGroup; diff --git a/index.js b/index.js index 7930e8c..c7e5b59 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -import RadioButtonsGroup from "./lib/RadioButtonsGroup"; +import RadioButtonsGroup from "./lib"; export default RadioButtonsGroup; \ No newline at end of file diff --git a/lib/RadioButtonsGroup/RadioButton.tsx b/lib/RadioButton.tsx similarity index 97% rename from lib/RadioButtonsGroup/RadioButton.tsx rename to lib/RadioButton.tsx index 496fad0..5884b85 100644 --- a/lib/RadioButtonsGroup/RadioButton.tsx +++ b/lib/RadioButton.tsx @@ -5,6 +5,7 @@ import { RadioButtonProps } from './types'; export default function RadioButton({ color = '#444', + containerStyle, disabled = false, id, label, @@ -38,7 +39,7 @@ export default function RadioButton({ return (