Skip to content

Commit

Permalink
fix(radioButton): update color deprecated (#191)
Browse files Browse the repository at this point in the history
* fix(radioButton): update color deprecated

* chore(radioButton): remove imports

* "chore(release): 7.4.1-0 [ci skip]"

Co-authored-by: Design system Natura in behalf of Design System Team <[email protected]>
  • Loading branch information
brunoViniciusTiCa and Design-System-Natura authored Sep 10, 2021
1 parent c0d6f50 commit 6446d28
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 22 deletions.
4 changes: 2 additions & 2 deletions ios/NaturaReactComponents.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-NaturaReactComponents-NaturaReactComponentsTests/Pods-NaturaReactComponents-NaturaReactComponentsTests-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
Expand Down Expand Up @@ -581,7 +581,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-NaturaReactComponents/Pods-NaturaReactComponents-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: e686045572151edef46010a6f819ade377dfeb4b
FBReactNativeSpec: 3c389f3165d06ccc6bf895092d8cdd0e9f21e969
FBReactNativeSpec: 937705a0408fc014748fb55458cffee8ee1a544d
Flipper: d3da1aa199aad94455ae725e9f3aa43f3ec17021
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c
Expand Down Expand Up @@ -500,4 +500,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 108069e08ac6c04038b57560c0ea0a7119924f74

COCOAPODS: 1.10.1
COCOAPODS: 1.11.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@naturacosmeticos/natds-rn",
"version": "7.4.0",
"version": "7.4.1-0",
"license": "ISC",
"main": "build/lib/index.js",
"keywords": [
Expand Down
17 changes: 2 additions & 15 deletions src/components/RadioButton/RadioButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState } from 'react';
import { View } from 'react-native';
import { boolean, select, text } from '@storybook/addon-knobs';
import { boolean, text } from '@storybook/addon-knobs';

import { RadioButton, RadioButtonColors } from './RadioButton';
import { RadioButton } from './RadioButton';

export default {
component: RadioButton,
Expand All @@ -12,11 +12,6 @@ export default {
title: 'Components|RadioButton',
};

const colorTypes = {
primary: 'primary',
secondary: 'secondary',
};

export const all = () => {
const [selected, setSelected] = useState<string | null>(null);

Expand All @@ -29,13 +24,6 @@ export const all = () => {
label="Primary"
value='1'
/>
<RadioButton
color="secondary"
selected={selected === '2'}
onPress={setSelected}
label="Secondary"
value='2'
/>
<RadioButton
label="Disabled"
disabled
Expand All @@ -53,7 +41,6 @@ export const all = () => {
export const interactive = () => (
<View style={{ maxWidth: 600, padding: 30 }}>
<RadioButton
color={select('Color', colorTypes, 'primary') as RadioButtonColors}
selected={boolean('Selected', true)}
disabled={boolean('Disabled', false)}
onPress={() => null}
Expand Down
10 changes: 8 additions & 2 deletions src/components/RadioButton/RadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ import {
Container, Circle, Center, Label, Wrapper,
} from './RadioButton.styles';

export type RadioButtonColors = 'primary' | 'secondary';
/**
* @deprecated use `primary` instead
*/
type RadioButtonDeprecatedColor = 'secondary'
export type RadioButtonColors = 'primary' | RadioButtonDeprecatedColor;

export interface RadioButtonProps {
/**
* RadioButton color: `primary` | `secondary`
* RadioButton color: `primary`
*
* deprecated color: `secondary`
*/
color?: RadioButtonColors;
/**
Expand Down

0 comments on commit 6446d28

Please sign in to comment.