first tr classname & hidden mobile controlled

This commit is contained in:
Burak Civan
2022-08-08 11:39:29 +03:00
parent cf5f65310e
commit f84dcb0c78
25 changed files with 51 additions and 34 deletions

View File

@ -11,6 +11,7 @@ class Td extends Component
public $override;
public $kind;
public $hiddenMobile;
/**
* Create a new component instance.
@ -18,11 +19,12 @@ class Td extends Component
* @return void
*/
public function __construct(
string $class = '', string $override = '', string $kind = ''
string $class = '', string $override = '', string $kind = '', bool $hiddenMobile = false,
) {
$this->override = $this->getOverride($override);
$this->kind = $kind;
$this->hiddenMobile = $hiddenMobile;
$this->class = $this->getClass($class);
}
@ -47,6 +49,10 @@ class Td extends Component
return $class;
}
if ($this->hiddenMobile) {
$class = $class . ' ' . 'hidden sm:table-cell';
}
$default = 'py-4 whitespace-nowrap text-sm font-normal text-black truncate';
switch ($this->kind) {