2017-08-31 46 views
0

語義UI陣營Checkbox可以像這樣使用:在語義UI URL鏈接複選框標籤陣營

import React from 'react' 
import { Checkbox } from 'semantic-ui-react' 

const TermsOfServiceCheckbox =() => (
    <Checkbox label='I accept the Terms of Service' /> 
) 

export default TermsOfServiceCheckbox 

如何設置複選框標籤,從而使文本服務條款的是一個鏈接網址是什麼?

回答

0

label道具實現了項目的簡寫,所以你也可以通過有:

<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> }} /> 
+0

只用'

+0

是的,我忘了'Checkbox'在標記中需要'label'。我檢查了代碼並更新了答案。謝謝 –