mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-02 16:16:18 +00:00
adfb69a68c
* Use the testcase widget for the $reveal widget examples * Convert $reveal testcase widget examples into testcase tiddlers * Add expected results to $reveal test case tiddlers These examples are intended to be interactive and the expect results only test the initial rendering. Still that seems like useful verification
27 lines
773 B
Plaintext
27 lines
773 B
Plaintext
created: 20240721163229297
|
|
description: Simple content reveal
|
|
modified: 20240721172211283
|
|
tags: $:/tags/wiki-test-spec
|
|
title: TestCases/RevealWidget/SimpleReveal
|
|
type: text/vnd.tiddlywiki-multiple
|
|
|
|
title: Narrative
|
|
|
|
Two distinct buttons toggle the state of the tiddler value. The reveal widget displays its content for one of the two states.
|
|
+
|
|
title: Output
|
|
|
|
<$button set="$:/state/SampleReveal1" setTo="show">Show me</$button>
|
|
<$button set="$:/state/SampleReveal1" setTo="hide">Hide me</$button>
|
|
|
|
<$reveal type="match" state="$:/state/SampleReveal1" text="show">
|
|
|
|
! This is the revealed content
|
|
And this is some text
|
|
|
|
</$reveal>
|
|
+
|
|
title: ExpectedResult
|
|
|
|
<p><button class="">Show me</button>
|
|
<button class="">Hide me</button></p><div class=" tc-reveal" hidden="true"></div> |