@seedcss/seed-alert
v1.0.1
Published
Alert component pack for Seed
Downloads
4
Readme
seed-alert
Alert component pack for Seed
Install
npm install @seedcss/seed-alert --save
Documentation
Check out our documentation of this pack.
Basic Usage
SCSS
This seed pack needs to be imported into your sass pipeline. Below is an example using Gulp:
const gulp = require("gulp");
const sass = require("gulp-sass");
const pathfinder = require("sass-pathfinder");
const pack = require("@seedcss/seed-alert");
gulp.task("sass", function() {
return gulp
.src("./sass/**/*.scss")
.pipe(
sass({
includePaths: pathfinder(
// Other includePaths...
pack
)
})
)
.pipe(gulp.dest("./css"));
});
Once that is setup, simply @import
seed-alert as needed in your .scss
file:
// Packs
@import "pack/seed-alert/_index";
Options
The following variables can be found in _config.scss
// Alert :: Config
// Dependencies
@import "pack/seed-button/_config";
// Namespace
$seed-alert-namespace: "c-alert" !default;
$seed-alert-error-namespace: "error" !default;
$seed-alert-info-namespace: "info" !default;
$seed-alert-success-namespace: "success" !default;
$seed-alert-warning-namespace: "warning" !default;
$seed-alert-text-namespace: "#{$seed-alert-namespace}__text" !default;
// Configs
$seed-alert-accent-width: 4px !default;
$seed-alert-padding: 12px 16px 12px 20px !default;
$seed-alert-margin-bottom: 16px !default;
// Config for state prefix
// options: true || false
// if true, then alert states will compile with the defined state prefix
// Default is ".is-"
// Example:
// .is-success {
// ...
// }
$seed-alert-enable-state-prefix: true !default;
$seed-alert-state-prefix: "is" !default;
$seed-alert-allow-link-normalize: true !default;
$seed-alert-link-normalize-selector: "a:not(.#{$seed-button-namespace})" !default;