naive-ui/demo/documentation/components/icon/enUS/theme.md
2020-01-27 20:49:03 +08:00

380 B

Theme

Naive UI provides a simple way to custom style of icon in different themes.

<n-icon
  size="40"
  :themed-style="{
    dark: {
      fill: 'rgba(255, 0, 0, .5)'
    },
    light: {
      fill: 'rgba(0, 128, 0, .5)'
    }
  }"
>
  <md-cash />
</n-icon>
import mdCash from 'naive-ui/lib/icons/md-cash'

export default {
  components: {
    mdCash
  }
}