From 03347297bfb9fbce5eb6f235e2b5afc692532423 Mon Sep 17 00:00:00 2001 From: Randy Topliffe Date: Tue, 23 Apr 2019 13:41:50 -0400 Subject: [PATCH] Few improvements - Add comment to explicitly mark the code as an example of a Provider - Remove unused import --- docs/advanced.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/advanced.md b/docs/advanced.md index 9df84d9..e0e3821 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -50,8 +50,8 @@ which can be used to show custom page numbers or add other elements to the UI. The example below will display the current slide out of the total amount of slides. ```js +// Example Provider.js import React from 'react' -import { css } from '@emotion/core' function AtTheBottomCenter ({ children }) { const css = { @@ -63,15 +63,15 @@ function AtTheBottomCenter ({ children }) { textAlign: 'center', } - return
- { children } + return
+ {children}
} export function Provider ({ children, ...props }) { return <> - { children } - { props.index }/{ props.slides.length } + {children} + {props.index}/{props.slides.length} } ```