diff --git a/src/components/RadioButton.js b/src/components/RadioButton.js index 9d8e739d723c..a8ac974ac5fe 100644 --- a/src/components/RadioButton.js +++ b/src/components/RadioButton.js @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; import CONST from '@src/CONST'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; @@ -39,13 +40,15 @@ function RadioButton(props) { accessibilityLabel={props.accessibilityLabel} accessibilityRole={CONST.ACCESSIBILITY_ROLE.RADIO} > - - + + {props.isChecked && ( + + )} ); diff --git a/src/components/RadioButtonWithLabel.js b/src/components/RadioButtonWithLabel.js index 21a04bfcefef..039b93ac8a0f 100644 --- a/src/components/RadioButtonWithLabel.js +++ b/src/components/RadioButtonWithLabel.js @@ -65,8 +65,8 @@ function RadioButtonWithLabel(props) { style={[styles.flexRow, styles.flexWrap, styles.flexShrink1, styles.alignItemsCenter]} wrapperStyle={[styles.ml3, styles.pr2, styles.w100]} // disable hover style when disabled - hoverDimmingValue={1} - pressDimmingValue={0.2} + hoverDimmingValue={0.8} + pressDimmingValue={0.5} > {Boolean(props.label) && {props.label}} {Boolean(LabelComponent) && } diff --git a/src/stories/RadioButtonWithLabel.stories.js b/src/stories/RadioButtonWithLabel.stories.js new file mode 100644 index 000000000000..af5d6ec15a8c --- /dev/null +++ b/src/stories/RadioButtonWithLabel.stories.js @@ -0,0 +1,36 @@ +import React from 'react'; +import RadioButtonWithLabel from '@components/RadioButtonWithLabel'; + +/** + * We use the Component Story Format for writing stories. Follow the docs here: + * + * https://storybook.js.org/docs/react/writing-stories/introduction#component-story-format + */ +const story = { + title: 'Components/RadioButtonWithLabel', + component: RadioButtonWithLabel, +}; + +function Template(args) { + // eslint-disable-next-line react/jsx-props-no-spreading + return ; +} + +// Arguments can be passed to the component by binding +// See: https://storybook.js.org/docs/react/writing-stories/introduction#using-args +const Default = Template.bind({}); +const Checked = Template.bind({}); +Default.args = { + isChecked: false, + label: 'This radio button is unchecked', + onInputChange: () => {}, +}; + +Checked.args = { + isChecked: true, + label: 'This radio button is checked', + onInputChange: () => {}, +}; + +export default story; +export {Default, Checked}; diff --git a/src/styles/styles.ts b/src/styles/styles.ts index 404c5983d7f7..318c8db2f67f 100644 --- a/src/styles/styles.ts +++ b/src/styles/styles.ts @@ -2567,7 +2567,7 @@ const styles = (theme: ThemeDefault) => borderRadius: 10, height: 20, width: 20, - borderColor: theme.icon, + borderColor: theme.border, borderWidth: 1, justifyContent: 'center', alignItems: 'center',