Change styling on hover semantic-ui-react components

前端 未结 3 1982
南旧
南旧 2021-01-19 16:39

if I set up a className for certain components like


and in my

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 17:35

    Choose any color semantic-ui provide for example:

    Your button appears like:

    You can add inverted props inside Button component that react semantic-ui provide

    your component appears like:

    On hover returns to basic style opposite of inverted

    styled components usage with react semantic ui

    I recommended you to use styled-components in order to override semantic-ui component style

    import { Tab, Form, Button, Grid, Icon } from "semantic-ui-react";
    import styled from "styled-components";
    
    const Mybutton = styled(Button)`
     &:hover {
        color: #fff !important;
     }
    `;
    

    Next use your new styled component instead of semantic-ui

    
       Sign In
    
    

提交回复
热议问题