Skip to content

Commit

Permalink
allowing for expandable toml
Browse files Browse the repository at this point in the history
  • Loading branch information
bengtlofgren committed Jun 29, 2023
1 parent 81764dc commit 023f4c0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
19 changes: 19 additions & 0 deletions packages/docs/components/Expandable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { useState, useEffect } from 'react';


const Expandable= ({ children }) => {
const [expanded, setExpanded] = useState(false);

const toggleExpand = () => {
setExpanded(!expanded);
};

return (
<div>
{children}
<button onClick={toggleExpand}>{expanded ? 'Collapse' : 'Expand'}</button>
</div>
);
};

export default Expandable;
22 changes: 0 additions & 22 deletions packages/docs/components/ExpandableToml.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion packages/docs/pages/ledger/env-vars.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Callout } from 'nextra-theme-docs'
// import ExpandableToml from "../../components/ExpandableToml"; #TODO: Use this component when properly css'd
import Expandable from "../../components/Expandable"; // TODO: Use this component when properly css'd

# Environment variables

By default, whenever the namada ledger is started, it will apply the confirguration found in the ledger configuration file.

An example of a ledger configuration file is displayed below.

<Expandable>
```toml
wasm_dir = "wasm"

Expand Down Expand Up @@ -38,6 +39,7 @@ priv_validator_laddr = ""

...
```
</Expandable>

However, it is possible to override the configuration by setting environment variables.
Any variable found in the config can be accessed through environment variables that are constructed in the below manner.
Expand Down

0 comments on commit 023f4c0

Please sign in to comment.