| Total Complexity | 2 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class ThemeToggle extends Component |
||
| 12 | { |
||
| 13 | public string $uuid; |
||
| 14 | |||
| 15 | public function __construct( |
||
| 16 | public ?string $id = null, |
||
| 17 | public ?string $value = null, |
||
| 18 | public ?string $light = "Light", |
||
| 19 | public ?string $dark = "Dark", |
||
| 20 | public ?string $lightTheme = "light", |
||
| 21 | public ?string $darkTheme = "dark", |
||
| 22 | public ?string $lightClass = "light", |
||
| 23 | public ?string $darkClass = "dark", |
||
| 24 | public ?bool $withLabel = false, |
||
| 25 | ) { |
||
| 26 | $this->uuid = md5(serialize($this)) . $id; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get the view / contents that represent the component. |
||
| 31 | */ |
||
| 32 | public function render(): View|Closure|string |
||
| 35 | } |
||
| 36 | } |
||
| 37 |