Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Switch option] Custom color for text and circle #837

Closed
danyj opened this issue Sep 3, 2015 · 4 comments

Comments

@danyj
Copy link
Contributor

commented Sep 3, 2015

Can we please add an option to the switch that would change the circle color and text

example

'section_switch' =>array (

        'type'  => 'switch',
        'value' => 0,
        'attr'  => array( 'class' => 'custom-class', 'data-foo' => 'bar' ),
        'label' => __('Label', 'fw'),
        'desc'  => __('Description', 'fw'),
        'help'  => __('Help tip', 'fw'),
        'left-choice' => array(
            'value' => 0,
            'label' => __('Active', 'fw'),
            'color' => 'green'
        ),
        'right-choice' => array(
            'value' => 1,
            'label' => __('Inactive', 'fw'),
            'color' => 'red'
        ),


),

When active
http://prntscr.com/8c40h1

Inactive

http://prntscr.com/8c40pq

@ghost ghost self-assigned this Sep 3, 2015
@ghost ghost added the enhancement label Sep 4, 2015
@osb0

This comment has been minimized.

Copy link

commented Sep 6, 2015

good idea :) i like it

@thednp

This comment has been minimized.

Copy link
Contributor

commented Nov 5, 2015

I would use gray for inactive. Also think this idea is alright.

@ghost ghost changed the title Switch option improvement suggestion [Switch option] Custom color for text and circle Mar 7, 2016
@ghost ghost added ready and removed ready labels May 4, 2016
@ghost ghost closed this in f312972 May 6, 2016
@ghost ghost removed the in progress label May 6, 2016
@ghost

This comment has been minimized.

Copy link

commented May 6, 2016

array (
        'type'  => 'switch',
        'left-choice' => array(
            'color' => '#f00',
            //...
        ),
        'right-choice' => array(
            'color' => '#00ff00',
            //...
        ),
        //...
),
@bilal-ahmed-dev

This comment has been minimized.

Copy link

commented Sep 16, 2017

Hello @moldcraft

That's wonderful for color option in switch option type.
Can you add another option for switch like the font-size and text-transform property so if i want to show only first letter capital and remaining in small that's would be wonderful.

Looking Forward

@bilal-ahmed-dev bilal-ahmed-dev unassigned ghost Sep 16, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.