From d350e5f2f0966f8688a93135a848269c751c795b Mon Sep 17 00:00:00 2001 From: Pierre Besson Date: Wed, 1 Jul 2015 19:43:45 +0200 Subject: [PATCH] [role] Add role tag and example. or --- common/index.js | 3 +- common/role/README.md | 37 ++++++++++++++++++ common/role/example/index.html | 70 ++++++++++++++++++++++++++++++++++ common/role/index.js | 29 ++++++++++++++ package.json | 4 ++ 5 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 common/role/README.md create mode 100644 common/role/example/index.html create mode 100644 common/role/index.js diff --git a/common/index.js b/common/index.js index dbb312f7e..d43fcf4cf 100644 --- a/common/index.js +++ b/common/index.js @@ -19,5 +19,6 @@ module.exports = { mixin: require('./mixin'), display: require('./display'), detail: require('./detail'), - progressBar: require('./progress-bar') + progressBar: require('./progress-bar'), + role: require('./role') }; diff --git a/common/role/README.md b/common/role/README.md new file mode 100644 index 000000000..ceec19ede --- /dev/null +++ b/common/role/README.md @@ -0,0 +1,37 @@ +# roles +It is a wrapper tag, its only use is to protect its content. +Warning: the content sould not be two dom element. +The role tag is super easy to use, there are two concepts: + +- a user has at least one Role + +In a render function + +```javascript +//SomeWhere else +let Role = FocusComponents.common.role.component; + +render(){ + return ( + +