-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Ilimic\Classnames; | ||
|
||
/** | ||
* @param mixed[] $args | ||
*/ | ||
function classnames( ...$args ) : string | ||
{ | ||
return Classnames::classnames( ...$args ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use function Ilimic\Classnames\classnames; | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
require_once __DIR__ . '/helpers.php'; | ||
|
||
var_dump( classnames( 'c-article', 'c-article--small' ) ); | ||
var_dump( classnames( [ | ||
'c-article', | ||
'c-article' => false, | ||
] ) ); | ||
|
||
?> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title></title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="css/main.css"> | ||
</head> | ||
<body> | ||
<div class="<?php echo classnames( 'c-box', 'c-box--small' ); ?>"> | ||
Small box. | ||
</div> | ||
<div class="<?php echo classnames( 'c-content' ); ?>"> | ||
<p>Hello world! This is HTML5 Boilerplate.</p> | ||
</div> | ||
</body> | ||
</html> |