Skip to content

Commit

Permalink
chore: replace span; remove RadioGroup.mini
Browse files Browse the repository at this point in the history
  • Loading branch information
王梦良 authored and 王梦良 committed Aug 31, 2023
1 parent d181aa6 commit f1cfafb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 105 deletions.
22 changes: 0 additions & 22 deletions packages/mini-demo/src/pages/radio/index.scss

This file was deleted.

1 change: 0 additions & 1 deletion packages/mini-demo/src/pages/radio/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Basic from './component/basic';
import Button from './component/button';
import Group from './component/group';
import List from './component/list';
import './index.scss';

export default () => {
return (
Expand Down
8 changes: 4 additions & 4 deletions packages/zarm/src/radio/Radio.mini.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ const Radio = forwardRef<RadioRef, RadioProps>((props, ref) => {

const currentProps = { ...props, checked };

const textRender = props.children && <span className={bem('text')}>{props.children}</span>;
const textRender = props.children && <View className={bem('text')}>{props.children}</View>;

const iconRender = (
<span className={bem('icon')}>
<View className={bem('icon')}>
{props.renderIcon ? (
props.renderIcon(currentProps)
) : (
<span className={bem('tick')}>{props.indeterminate ? <MinusIcon /> : <SuccessIcon />}</span>
<View className={bem('tick')}>{props.indeterminate ? <MinusIcon /> : <SuccessIcon />}</View>
)}
</span>
</View>
);

const inputRender = (
Expand Down
76 changes: 0 additions & 76 deletions packages/zarm/src/radio/RadioGroup.mini.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions packages/zarm/src/radio/index.mini.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import attachPropertiesToComponent from '../utils/attachPropertiesToComponent';
import Radio from './Radio.mini';
import Group from './RadioGroup.mini';
import Group from './RadioGroup';

export type { RadioCssVars, RadioProps, RadioRef } from './Radio.mini';
export type { RadioGroupCssVars, RadioGroupProps } from './RadioGroup.mini';
export type { RadioGroupCssVars, RadioGroupProps } from './RadioGroup';

export default attachPropertiesToComponent(Radio, {
Group,
Expand Down

0 comments on commit f1cfafb

Please sign in to comment.