简体   繁体   中英

Semantic-Ui-React label color inverted

I try to use label in semantic-ui-react. However, its color is inverted like below.

在此处输入图片说明

I expected below one.

在此处输入图片说明

My code is here:

<div className="resetBtn">
  <Button size="medium" onClick={this.onResetClick} primary>Reset dates</Button>
  <Label color="olive" pointing="below">Select the start date</Label>
</div>

What's wrong with my code?

You should use basic attribute for the label.

So instead of using Label as -

<Label color="olive" pointing="below">Select the start date</Label>

Add basic attribute to Label as -

<Label color="olive" pointing="below" basic>Select the start date</Label>

Hope this helps. More info on basic attribute of Label component is available here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM