naive-ui/demo/documentation/theme/enUS/themedStyle.md
2019-12-07 00:02:31 +08:00

606 B

Use Themed Style

Some of components has themed-style prop to help you simply modify the style of outer element's style of a component. For some simple components it could be very useful.

<n-icon
  size="40"
  :themed-style="{
    dark: {
      fill: 'yellow'
    },
    light: {
      fill: 'red'
    }
  }"
>
  <md-cash />
</n-icon>
import mdCash from 'naive-ui/lib/icons/md-cash'
import mdContacts from 'naive-ui/lib/icons/md-contacts'
import iosContacts from 'naive-ui/lib/icons/ios-contacts'

export default {
  components: {
    mdCash,
    mdContacts,
    iosContacts
  }
}