Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Commit

Permalink
Automating the generation of buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Redfern committed Mar 13, 2017
1 parent a6056dc commit 418cb7e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pattern/component/button/ghost.php
@@ -0,0 +1,2 @@
<a href="#" class="btn btn--ghost">Ghost Button</a>
<button type="button" class="btn btn--ghost">Ghost Button</button>
20 changes: 20 additions & 0 deletions pattern/component/button/variation.php
@@ -0,0 +1,20 @@
<?php
$minus = array(
'btn',
'btn--text',
'btn--block',
'btn--sm',
'btn--lg',
'btn--ghost',
'btn--disabled'
);
$classes = Helper::parseCss('btn--');
$classes = array_diff($classes, $minus);

?>
<?php foreach($classes as $class) : ?>
<p><a href="#" class="btn <?php echo $class; ?>"> <?php echo $class; ?> Button</a>
<button type="button" class="btn <?php echo $class; ?>"> <?php echo $class; ?> Button</button></p>
<p><a href="#" class="btn btn--ghost <?php echo $class; ?>"> <?php echo $class; ?> Ghost Button</a>
<button type="button" class="btn btn--ghost <?php echo $class; ?>"> <?php echo $class; ?> Ghost Button</button></p>
<?php endforeach; ?>
2 changes: 0 additions & 2 deletions pattern/component/button/variations.php

This file was deleted.

0 comments on commit 418cb7e

Please sign in to comment.