demo: fix Radio demo style (#56903)

* demo: fix Radio demo style

* update snap
This commit is contained in:
lijianan
2026-02-08 20:23:52 +08:00
committed by GitHub
parent cee829816a
commit f09e41ec8d
3 changed files with 17 additions and 3 deletions

View File

@@ -1561,6 +1561,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx extend context correc
>
<label
class="ant-radio-wrapper ant-radio-wrapper-checked css-var-test-id ant-radio-css-var"
style="height: 32px; line-height: 32px;"
>
<span
class="ant-radio ant-wave-target ant-radio-checked"
@@ -1584,6 +1585,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx extend context correc
</label>
<label
class="ant-radio-wrapper css-var-test-id ant-radio-css-var"
style="height: 32px; line-height: 32px;"
>
<span
class="ant-radio ant-wave-target"
@@ -1606,6 +1608,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx extend context correc
</label>
<label
class="ant-radio-wrapper css-var-test-id ant-radio-css-var"
style="height: 32px; line-height: 32px;"
>
<span
class="ant-radio ant-wave-target"
@@ -1628,6 +1631,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx extend context correc
</label>
<label
class="ant-radio-wrapper css-var-test-id ant-radio-css-var"
style="height: 32px; line-height: 32px;"
>
<span
class="ant-radio ant-wave-target"

View File

@@ -1543,6 +1543,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx correctly 1`] = `
>
<label
class="ant-radio-wrapper ant-radio-wrapper-checked css-var-test-id ant-radio-css-var"
style="height:32px;line-height:32px"
>
<span
class="ant-radio ant-wave-target ant-radio-checked"
@@ -1566,6 +1567,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx correctly 1`] = `
</label>
<label
class="ant-radio-wrapper css-var-test-id ant-radio-css-var"
style="height:32px;line-height:32px"
>
<span
class="ant-radio ant-wave-target"
@@ -1588,6 +1590,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx correctly 1`] = `
</label>
<label
class="ant-radio-wrapper css-var-test-id ant-radio-css-var"
style="height:32px;line-height:32px"
>
<span
class="ant-radio ant-wave-target"
@@ -1610,6 +1613,7 @@ exports[`renders components/radio/demo/radiogroup-more.tsx correctly 1`] = `
</label>
<label
class="ant-radio-wrapper css-var-test-id ant-radio-css-var"
style="height:32px;line-height:32px"
>
<span
class="ant-radio ant-wave-target"

View File

@@ -2,6 +2,11 @@ import React, { useState } from 'react';
import type { RadioChangeEvent } from 'antd';
import { Input, Radio } from 'antd';
const labelStyle: React.CSSProperties = {
height: 32,
lineHeight: '32px',
};
const App: React.FC = () => {
const [value, setValue] = useState(1);
@@ -15,11 +20,12 @@ const App: React.FC = () => {
onChange={onChange}
value={value}
options={[
{ value: 1, label: 'Option A' },
{ value: 2, label: 'Option B' },
{ value: 3, label: 'Option C' },
{ value: 1, style: labelStyle, label: 'Option A' },
{ value: 2, style: labelStyle, label: 'Option B' },
{ value: 3, style: labelStyle, label: 'Option C' },
{
value: 4,
style: labelStyle,
label: (
<>
More...