语义 UI React 中带有 URL link 的复选框标签
Checkbox label with URL link in Semantic UI React
语义UI React Checkbox可以这样使用:
import React from 'react'
import { Checkbox } from 'semantic-ui-react'
const TermsOfServiceCheckbox = () => (
<Checkbox label='I accept the Terms of Service' />
)
export default TermsOfServiceCheckbox
如何设置复选框标签,使文本 服务条款 成为 link 到 URL?
label
道具实现了项目shorthand,所以你也可以通过那里:
<Checkbox label={<label><a href='/'>I accept the Terms of Service</a></label>} />
<Checkbox label={<label>I accept the <a href='/'>Terms of Service</a></label>} />
<Checkbox label={{ children: <a href='/'>I accept the Terms of Service</a> }} />
语义UI React Checkbox可以这样使用:
import React from 'react'
import { Checkbox } from 'semantic-ui-react'
const TermsOfServiceCheckbox = () => (
<Checkbox label='I accept the Terms of Service' />
)
export default TermsOfServiceCheckbox
如何设置复选框标签,使文本 服务条款 成为 link 到 URL?
label
道具实现了项目shorthand,所以你也可以通过那里:
<Checkbox label={<label><a href='/'>I accept the Terms of Service</a></label>} />
<Checkbox label={<label>I accept the <a href='/'>Terms of Service</a></label>} />
<Checkbox label={{ children: <a href='/'>I accept the Terms of Service</a> }} />