From ca91d046f735927b14bcd7272c59422fb9598133 Mon Sep 17 00:00:00 2001 From: Nolan J Tait Date: Wed, 4 Sep 2024 12:35:04 -0700 Subject: [PATCH] Adds info about merging to README --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index db8922c..d022ec9 100644 --- a/README.md +++ b/README.md @@ -268,9 +268,11 @@ end `css[:container]` slot which we define in our theme. The `ul` elements class would be `space-y-4` as that is the `css[:container]` on our theme. -Special html options will be safely merged. For examples, the component above -defines a list controller. If we passed our own controller into data when we -initialize, the component's data-controller attribute would be appended to: +Special html options (`class`, `data`) will be safely merged. + +For examples, the component above defines a list controller. If we passed our +own controller into data when we initialize, the component's data-controller +attribute would be appended to: ```ruby render List.new( @@ -317,7 +319,7 @@ class List < Protos::Component end ``` -This makes our initializaiton declarative and easy to extend without having to +This makes our initialization declarative and easy to extend without having to consider how to call `super` in the initializer. The following keywords are reserved in the base class: @@ -401,7 +403,7 @@ If bundler is not being used to manage dependencies, install the gem by executin ## Usage -Setup [Tailwindcss](https://tailwindcss.com/), [daisyUI](https://daisyui.com) +Setup [TailwindCSS](https://tailwindcss.com/), [DaisyUI](https://daisyui.com) and add the protos path to your content. ``` @@ -409,7 +411,7 @@ npm install -D tailwindcss postcss autoprefixer daisyui npx tailwindcss init ``` -Then we need to add the protos path to the `content` of our tailwindcss config +Then we need to add the protos path to the `content` of our tailwind config so tailwind will read the styles defined in the Protos gem. Protos also uses semantic spacing such as `p-sm` or `m-md` instead of set