-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from appwrite/tabs-text-editor
Tabs text editor
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Tabs Text Editor | ||
description: An input field in which users can type and edit text. | ||
--- | ||
|
||
<Preview noFlex> | ||
<section class="tab-text-editor"> | ||
<nav class="tab-text-editor-nav"> | ||
<ul class="secondary-tabs is-large is-stretch"> | ||
<li class="secondary-tabs-item"> | ||
<button class="secondary-tabs-button" disabled> | ||
<span class="body-text-2">Item</span> | ||
</button> | ||
</li> | ||
<li class="secondary-tabs-item"> | ||
<button class="secondary-tabs-button"> | ||
<span class="body-text-2">Item</span> | ||
</button> | ||
</li> | ||
</ul> | ||
</nav> | ||
<div class="tab-text-editor-content-box"> | ||
<textarea class="tab-text-editor-content">Prod=thisisvalue</textarea> | ||
<div class="tab-text-editor-options"> | ||
<div class="u-flex u-gap-4"> | ||
<button class="button is-text is-only-icon" aria-label="download code file"> | ||
<span class="icon-download" aria-hidden="true"></span> | ||
</button> | ||
<button class="button is-text is-only-icon" aria-label="copy code"> | ||
<span class="icon-duplicate" aria-hidden="true"></span> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</Preview> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@use '../abstract' as *; | ||
|
||
.tab-text-editor { | ||
--p-tab-text-editor-bg-color: var(--color-neutral-0); | ||
|
||
background-color:hsl(var(--p-tab-text-editor-bg-color)); | ||
border:solid pxToRem(1) hsl(var(--color-border)); border-radius:var(--border-radius-small); | ||
|
||
&-nav { padding:pxToRem(8); border-block-end:solid pxToRem(1) hsl(var(--color-border)); } | ||
&-content-box { position:relative; } | ||
&-content { padding:pxToRem(12); block-size:pxToRem(200); overflow:auto; border-width:0; font-family:var(--code-font); } | ||
&-options { | ||
opacity:0; transition:var(--transition); | ||
padding-inline-end:pxToRem(8); padding-block-end:pxToRem(8); | ||
position:absolute; inset-inline-end:0; inset-block-end:0; | ||
background: linear-gradient(315deg, hsl(var(--p-tab-text-editor-bg-color)) 35%, hsl(var(--p-tab-text-editor-bg-color) / 0) 100%); | ||
> * {filter:none; } | ||
} | ||
&:where(:focus-within, :hover, :focus) { | ||
.tab-text-editor-options { opacity:1; } | ||
} | ||
|
||
#{$theme-dark} & { | ||
--p-tab-text-editor-bg-color: var(--color-neutral-100); | ||
} | ||
} |