1.1.13 • Published 5 years ago
plugin-storage v1.1.13
search
Made with create-react-library
Install
npm install --save plugin-storage
Usage
import React, {memo} from 'react'
import { ApolloProvider, useQuery } from '@apollo/client'
import {PLUGIN_SETTING_QUERY, client} from 'plugin-storage'
const PluginQuery = memo(props => {
const LoadSetting = () => {
const {data} = useQuery(PLUGIN_SETTING_QUERY, {
variables: { id: props.settingId}
})
if(data){
const setting = data.pluginSetting;
return(
<div style={{padding: 10}} >
{Object.keys(setting).map(key =><div>{key}:{setting[key]}</div>)}
</div>
)
}
return null;
}
return (
<ApolloProvider client={client}>
<LoadSetting />
</ApolloProvider>
);
})
export default PluginQuery
License
MIT © khousuylong
1.1.13
5 years ago
1.1.12
5 years ago
1.1.11
5 years ago
1.1.10
5 years ago
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago