KimPaow / sanity-color-list

Sanity plugin that allows you to select a specific color from an array of colors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

initialValue?

RustyDev opened this issue · comments

Is it possible to set an initialValue?

Was able to resolve it:

    {
      title: 'Button Color',
      description: 'Pick a color',
      name: 'buttonColor',
      type: 'colorlist',
      options: {
        list: [
          {title: 'black', value: '#333333'},
          {title: 'blue', value: '#437c90'},
          {title: 'white', value: '#ffffff'}
        ]
      },
      initialValue: {
        title: 'black',
        value: '#333333'
      }
    },

Would be nice to add this to the documentation 😀