added icon sharp feature
This commit is contained in:
parent
c4bbad2c7e
commit
2534d28dca
@ -19,6 +19,9 @@ class Icon extends Component
|
|||||||
/** @var bool */
|
/** @var bool */
|
||||||
public $rounded;
|
public $rounded;
|
||||||
|
|
||||||
|
/** @var bool */
|
||||||
|
public $sharp;
|
||||||
|
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
public $simpleIcons;
|
public $simpleIcons;
|
||||||
|
|
||||||
@ -34,14 +37,15 @@ class Icon extends Component
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $icon = '', string $class = '',
|
string $icon = '', string $class = '',
|
||||||
bool $filled = false, bool $rounded = false,
|
bool $filled = false, bool $rounded = false, bool $sharp = false,
|
||||||
bool $simpleIcons = false, bool $custom = false, string $alias = ''
|
bool $simpleIcons = false, bool $custom = false, string $alias = ''
|
||||||
) {
|
) {
|
||||||
$this->icon = $icon;
|
$this->icon = $icon;
|
||||||
$this->class = ($simpleIcons) ? 'w-8 h-8 ' . $class : $class;
|
$this->class = ($simpleIcons) ? 'w-8 h-8 ' . $class : $class;
|
||||||
$this->filled = $filled;
|
$this->filled = $filled;
|
||||||
$this->rounded = $rounded;
|
$this->rounded = $rounded;
|
||||||
|
$this->sharp = $sharp;
|
||||||
$this->simpleIcons = $simpleIcons;
|
$this->simpleIcons = $simpleIcons;
|
||||||
$this->custom = $custom;
|
$this->custom = $custom;
|
||||||
$this->alias = $alias;
|
$this->alias = $alias;
|
||||||
|
@ -9,10 +9,11 @@
|
|||||||
@else
|
@else
|
||||||
<span
|
<span
|
||||||
@class([
|
@class([
|
||||||
'material-icons-outlined' => (! $filled && ! $rounded),
|
'material-icons-outlined' => (! $filled && ! $rounded && ! $sharp),
|
||||||
$class,
|
$class,
|
||||||
'material-icons' => $filled,
|
'material-icons' => $filled,
|
||||||
'material-icons-round' => $rounded,
|
'material-icons-round' => $rounded,
|
||||||
|
'material-icons-sharp'=> $sharp,
|
||||||
])
|
])
|
||||||
{{ $attributes }}
|
{{ $attributes }}
|
||||||
>{{ $icon }}</span>
|
>{{ $icon }}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user