diff --git a/README.md b/README.md index d21cd33..4afdfee 100644 --- a/README.md +++ b/README.md @@ -69,14 +69,21 @@ and writing like below: ## The culprit is ◯◯ - - + +Message that do not contain spoilers is here. +It is recommended that the first line be a blank line for markdown parser. + + +Message containing spoilers is here. + + + + +Message that do not contain spoilers is here. +`isBare` prop takes priority of `bare` attribute. + ``` ![NetaBare Switch](https://github.com/monsat/vuepress-plugin-netabare-switch/blob/main/doc/images/netabare-switch.gif?raw=true) @@ -97,14 +104,14 @@ plugins: [ ], ``` -## Component Slots and Props +## Component Slots, Props ,and Attributes ### ``: Toggle switch. `#default` slot is message to toggle NetaBare Default is in Japanese. -#### `name?: string` +#### `name?: string` prop using for `` id and storage key @@ -140,9 +147,16 @@ using for `` id and storage key ### ``: Div of spoiler -`#default` slot is paragraph excluding spoiler. +`#default` slot is paragraph including/excluding spoiler. + +#### `isBare?: boolean` prop + +If true, messages in the default slot are including spoiler. +If false, without spoiler even if `bare` attribute exists. + +#### `bare` attribute -`#bare` slot is paragraph including spoiler. +If exists, messages in the default slot are including spoiler. ### ``: Span of spoiler diff --git a/src/client/components/NetaBareDiv.vue b/src/client/components/NetaBareDiv.vue index c435967..e5abeb4 100644 --- a/src/client/components/NetaBareDiv.vue +++ b/src/client/components/NetaBareDiv.vue @@ -1,16 +1,25 @@