Closed victorcarvalhosp closed 5 years ago
Hi, tnx for use my project.
For border set 'plain' to true, and use 'p-toggle' component inside of 'p-checkbox'.
here is example, that you want.
<p-checkbox plain="true">
<p-toggle type="on">
<i p-icon class="material-icons">wifi</i>
Wifi on
</p-toggle>
<p-toggle type="off">
<i p-icon class="material-icons">wifi_off</i>
Wifi off
</p-toggle>
</p-checkbox>
Link to live example : https://stackblitz.com/edit/ngx-pretty-checkbox-wifi-example
Thanks! And how I can make this with radio buttons?
If you can add these instructions on the documentation would be awesome!
just change p-checkbox
to p-radio
. then wrap all p-radio
components with 'p-radio-group' component
<p-radio-group>
<p-radio plain="true">
<p-toggle type="on">
<i p-icon class="material-icons">wifi</i>
Wifi on 1
</p-toggle>
<p-toggle type="off">
<i p-icon class="material-icons">wifi_off</i>
Wifi off 1
</p-toggle>
</p-radio>
<p-radio plain="true">
<p-toggle type="on">
<i p-icon class="material-icons">wifi</i>
Wifi on 2
</p-toggle>
<p-toggle type="off">
<i p-icon class="material-icons">wifi_off</i>
Wifi off 2
</p-toggle>
</p-radio>
</p-radio-group>
I will make more examples and update demo page.
Hello guys! I really liked this components, but I can't find anywhere how to make a two icons component like this: Can you guys please update the demo page with these examples?
Thanks!